package com.utils.module;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

/**
 * Created by Administrator on 2016/8/18.
 */
public class ImgRequestLayout {

    public static void requestLayout(View img, Context context, float height, float width){
        ViewGroup.LayoutParams layoutParams = img.getLayoutParams();
        layoutParams.height = (int) (height / width * ScreenUtils.getScreenWidth(context));
        img.setLayoutParams(layoutParams);
    }

}
